{{ header }} 
{% include 'fastor/template/new_elements/wrapper_top.twig' %}

{% set theme_options = registry.get('theme_options') %}
{% set config = registry.get('config') %} 

<div class="row">
  <div class="col-sm-{% if (theme_options.get( 'custom_block', 'contact_page', config.get( 'config_language_id' ), 'status' ) == 1) %} {{ 9 }} {% else %} {{ 12 }} {% endif %}">


<h3>{{ text_location }}</h3>
    <div class="row" style="padding-bottom: 10px">
      {% if (image) %} 
      <div class="col-sm-3"><img src="{{ image }}" alt="{{ store }}" title="{{ store }}" class="img-thumbnail" /></div>
      {% endif %} 
      <div class="col-sm-3"><strong>{{ store }}</strong><br />
        <address>
        {{ address }} 
        </address>
        {% if (geocode) %} 
        <a href="https://maps.google.com/maps?q={{ geocode|url_encode }}&hl=en&t=m&z=15" target="_blank" class="btn btn-info"><i class="fa fa-map-marker"></i> {{ button_map }}</a>
        {% endif %} 
      </div>
      <div class="col-sm-3"><strong>{{ text_service }}</strong><br>
        {{ telephone }}<br />
        <br />
        {% if (fax) %} 
        <strong>{{ text_fax }}</strong><br>
        {{ fax }} 
        {% endif %} 
      </div>
      <div class="col-sm-3">
        {% if (open) %} 
        <strong>{{ text_open }}</strong><br />
        {{ open }}<br />
        <br />
        {% endif %} 
        {% if (comment) %} 
        <strong>{{ text_comment }}</strong><br />
        {{ comment }} 
        {% endif %} 
      </div>
    </div>

{% if (locations) %} 
<h3>{{ text_store }}</h3>
<div class="panel-group" id="accordion">
  {% for location in locations %} 
  <div class="panel panel-default">
    <div class="panel-heading">
      <h4 class="panel-title"><a href="#collapse-location{{ location['location_id'] }}" class="accordion-toggle" data-toggle="collapse" data-parent="#accordion">{{ location['name'] }} <i class="fa fa-caret-down"></i></a></h4>
    </div>
    <div class="panel-collapse collapse" id="collapse-location{{ location['location_id'] }}">
      <div class="panel-body">
        <div class="row">
          {% if (location['image']) %} 
          <div class="col-sm-3"><img src="{{ location['image'] }}" alt="{{ location['name'] }}" title="{{ location['name'] }}" class="img-thumbnail" /></div>
          {% endif %} 
          <div class="col-sm-3"><strong>{{ location['name'] }}</strong><br />
            <address>
            {{ location['address'] }} 
            </address>
            {% if (location['geocode']) %} 
             <a href="https://maps.google.com/maps?q={{ location['geocode']|url_encode }}&hl={{ geocode_hl }}&t=m&z=15" target="_blank" class="btn btn-info"><i class="fa fa-map-marker"></i> {{ button_map }}</a>
            {% endif %} 
          </div>
          <div class="col-sm-3"> <strong>{{ text_telephone }}</strong><br>
            {{ location['telephone'] }}<br />
            <br />
            {% if (location['fax']) %} 
            <strong>{{ text_fax }}</strong><br>
            {{ location['fax'] }} 
            {% endif %} 
          </div>
          <div class="col-sm-3">
            {% if (location['open']) %} 
            <strong>{{ text_open }}</strong><br />
            {{ location['open'] }}<br />
            <br />
            {% endif %} 
            {% if (location['comment']) %} 
            <strong>{{ text_comment }}</strong><br />
            {{ location['comment'] }} 
            {% endif %} 
          </div>
        </div>
      </div>
    </div>
  </div>
  {% endfor %} 
</div>
{% endif %} 

<form action="{{ action }}" method="post" enctype="multipart/form-data" class="form-horizontal">
  <fieldset>
    <legend>{{ text_contact }}</legend>
    <div class="form-group required">
      <label class="col-sm-2 control-label" for="input-name">{{ entry_name }}</label>
      <div class="col-sm-10">
        <input type="text" name="name" value="{{ name }}" id="input-name" class="form-control" />
        {% if (error_name) %} 
        <div class="text-danger">{{ error_name }}</div>
        {% endif %} 
      </div>
    </div>
    <div class="form-group required">
      <label class="col-sm-2 control-label" for="input-email">{{ entry_email }}</label>
      <div class="col-sm-10">
        <input type="text" name="email" value="{{ email }}" id="input-email" class="form-control" />
        {% if (error_email) %} 
        <div class="text-danger">{{ error_email }}</div>
        {% endif %} 
      </div>
    </div>
    <div class="form-group required">
      <label class="col-sm-2 control-label" for="input-enquiry">{{ entry_enquiry }}</label>
      <div class="col-sm-10">
        <textarea name="enquiry" rows="10" id="input-enquiry" class="form-control">{{ enquiry }}</textarea>
        {% if (error_enquiry) %} 
        <div class="text-danger">{{ error_enquiry }}</div>
        {% endif %} 
      </div>
    </div>
    {{ captcha }} 
  </fieldset>
            
  <div class="buttons">
    <div class="pull-right">
      {% if (theme_options.get( 'rodo_status' ) == '1') %} 
        {{ theme_options.html_entity_decode(theme_options.get( 'rodo_text', config.get( 'config_language_id' ) )) }} <input type="checkbox" name="agree_rodo" value="1" required="required">&nbsp;
      {% endif %} 
      <input class="btn btn-primary" type="submit" value="{{ button_submit }}" />
    </div>
  </div>
</form>
  
  </div>
    
  {% if (theme_options.get( 'custom_block', 'contact_page', config.get( 'config_language_id' ), 'status' ) == 1) %} 
  <div class="col-sm-3">
    <div class="product-block">
      {% if (theme_options.get( 'custom_block', 'contact_page', config.get( 'config_language_id' ), 'heading' ) != '') %} 
      <h4 class="title-block">{{ theme_options.get( 'custom_block', 'contact_page', config.get( 'config_language_id' ), 'heading' ) }}</h4>
      <div class="strip-line"></div>
      {% endif %} 
      <div class="block-content">
        {{ theme_options.html_entity_decode(theme_options.get( 'custom_block', 'contact_page', config.get( 'config_language_id' ), 'text' )) }} 
      </div>
    </div>
  </div>
  {% endif %} 
</div>

{% include 'fastor/template/new_elements/wrapper_bottom.twig' %}
{{ footer }}